 \ifdefined\directlua
 \pdfvariable gentounicode =1
 \protected\def\pdfglyphtounicode {\pdfextension glyphtounicode } 
 \input{glyphtounicode}
 \fi
\tableofcontents

\listoffigures

\newpage

\chapter{Introduction}

Some collection of \ldots 

\tagstructbegin{tag=Part}
   \refstepcounter{part}
   \addcontentsline{toc}{part}{Bears}

\chapter{Swiss Bears}

A swiss bear see figure~\ref{fig:swissbear}

\begin{figure}
\caption{Image of a swiss bear\label{fig:swissbear}}
\end{figure}

\section{Living ground}

Switzerland

\section{Hobbies}

\subsection{Music instrument}
Albhorn

\subsection{Books}
Oh, wie schön ist Panama


\chapter{Italian bears}

Italian bear, see figure~\ref{fig:italianbear}

\begin{figure}
\caption{Image of a Italian bear\label{fig:italianbear}}
\end{figure}

\chapter{Masked bear}

Masked bear

\tagstructend % end part

\cleardoublepage

\tagstructbegin{tag=Part}
\refstepcounter{part}
\addcontentsline{toc}{part}{Ducks}

\chapter{Hugging duck}

Duck hugging the globe, see figure~\ref{fig:duck}

\begin{figure}
\caption{Image of a duck\label{fig:duck}}
\end{figure}


\chapter{Witch duck}

Witch duck

\tagstructend 
